home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-2.iso / extra_2 / bwdev300.zip / BWDEV.DOC < prev    next >
Text File  |  1995-11-30  |  111KB  |  2,534 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.                 The Blue Wave Offline Mail System Developer's Kit
  23.                 Copyright (C) 1992-1995 by Cutting Edge Computing
  24.                                All Rights Reserved
  25.  
  26.  
  27.                            File Structures - Version 3
  28.                                 November 30, 1995
  29.  
  30.                             Created by George Hatchew
  31.                          Documentation by Martin Pollard
  32.  
  33.  
  34.                              Cutting Edge Computing
  35.                                  P.O. Box 90746
  36.                           Burton, Michigan  49509-0476
  37.                                        USA
  38.  
  39.  
  40.         BBS Support Number:  810-743-8464
  41.         FAX Support Number:  810-743-5910 (REGISTERED users only)
  42.         Voice Tech Support:  810-743-9283 (REGISTERED users only)
  43.  
  44.         FidoNet NetMail:  1:2240/176.0
  45.         Internet E-mail:  bluewave@cris.com
  46.         World Wide Web:   http://www.cris.com/~bluewave
  47.                                 -----------------
  48.                                 TABLE OF CONTENTS
  49.                                 -----------------
  50.  
  51.         COPYRIGHT AND RESTRICTIONS                               iii
  52.  
  53.         TRADEMARK NOTICES                                        iii
  54.  
  55.         Chapter 1
  56.             INTRODUCTION AND OVERVIEW                              1
  57.                 1.1  Introduction                                  1
  58.                 1.2  Overview of The Developer's Kit               1
  59.  
  60.         Chapter 2
  61.             A SHORT HISTORY OF OFFLINE MAIL                        3
  62.                 2.1  Necessity is a Mother...                      3
  63.                 2.2  The Pioneers of Offline Mail                  3
  64.                 2.3  Open Standards and the Blue Wave Format       4
  65.  
  66.         Chapter 3
  67.             DESCRIPTION OF BLUE WAVE PACKETS                       6
  68.                 3.1  Filename Conventions                          6
  69.                 3.2  The Packet ID                                 6
  70.                 3.3  The Blue Wave Mail Packet                     6
  71.                 3.4  The Blue Wave Reply Packet                    8
  72.  
  73.         Chapter 4
  74.             FILE STRUCTURE TECHNICAL INFORMATION                  10
  75.                 4.1  Data Types                                   10
  76.                 4.2  Using the File Structures                    10
  77.                 4.3  Using the Structure Length Fields            11
  78.                 4.4  Unused and Reserved Fields                   12
  79.  
  80.         Chapter 5
  81.             BLUE WAVE FORMAT DETAILED ANALYSIS                    13
  82.                 5.1  The *.INF File                               13
  83.                 5.2  The *.MIX File                               18
  84.                 5.3  The *.FTI File                               19
  85.                 5.4  The *.DAT File                               21
  86.                 5.5  The *.UPL File                               23
  87.                 5.6  Reply Message Text                           28
  88.                 5.7  The *.REQ File                               30
  89.                 5.8  The *.OLC File                               31
  90.  
  91.         APPENDIX A
  92.             OBSOLETE BLUE WAVE STRUCTURES                         35
  93.                 A.1  The *.UPI File                               35
  94.                 A.2  The *.NET File                               37
  95.                 A.3  The *.PDQ File                               38
  96.  
  97.         APPENDIX B
  98.             THE MICROSOFT WINDOWS INI FORMAT                      40
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.                                        ii
  111.                                                --------------------------
  112.                                                COPYRIGHT AND RESTRICTIONS
  113.                                                --------------------------
  114.  
  115.         The Blue  Wave Offline  Mail System  File  Structures  (hereafter
  116.         known as "structures" or "the structures") were created by George
  117.         Hatchew, and  are the  copyrighted property of George Hatchew and
  118.         Cutting Edge  Computing.  Permission is granted for third parties
  119.         to use  these structures  in  their  own  programs,  without  any
  120.         royalties or  licenses required.  Cutting Edge Computing reserves
  121.         the right  to make  any changes to these structures, at any time.
  122.         As such, third parties are requested not to make any unauthorized
  123.         changes to  these structures,  as Cutting  Edge Computing  is not
  124.         bound to  follow these  changes.   Any proposed changes should be
  125.         brought to  the attention  of Cutting  Edge Computing, where they
  126.         may be included in future revisions of the structures.
  127.  
  128.         Authors that use these structures are allowed to claim that their
  129.         programs are  "Blue Wave compatible", provided that such programs
  130.         can process  mail and  reply packets  that can be handled without
  131.         problems or  difficulties by The Blue Wave Offline Mail Doors and
  132.         Readers from Cutting Edge Computing.  (Think of it as the "litmus
  133.         test" for Blue Wave compatibility.)
  134.  
  135.         Finally, "Blue  Wave" is  a  trademarked  term  of  Cutting  Edge
  136.         Computing, and  cannot be  used by authors in the titles of their
  137.         applications.   This does  not, however,  restrict the ability to
  138.         describe the application as a "Blue Wave compatible" offline mail
  139.         application (i.e.  "FooBar: The Blue Wave-Compatible Offline Mail
  140.         Door for Widget BBS").
  141.  
  142.  
  143.  
  144.                                                         -----------------
  145.                                                         TRADEMARK NOTICES
  146.                                                         -----------------
  147.  
  148.         The following  are products, trademarks, or registered trademarks
  149.         of the following individuals and/or companies:
  150.  
  151.              Blue Wave - George Hatchew and Cutting Edge Computing
  152.              FidoNet - Tom Jennings and Fido Software
  153.              Macintosh, MacOS - Apple Computer Corp.
  154.              MS-DOS, Windows, Windows NT, Windows 95 - Microsoft Corp.
  155.              OS/2, PC-DOS - International Business Machines Corp.
  156.              PCBoard - Clark Development Inc.
  157.              PKZIP - PKWARE Inc.
  158.              QWK, Qmail, DeLuxe2, 1st Reader - Mark "Sparky" Herring
  159.              Silver Xpress - Hector Santos and Santronics Software
  160.              Turbo Pascal, Borland Pascal - Borland International
  161.              XRS - Michael Y. Ratledge
  162.  
  163.         Any omissions from this list are purely unintentional.
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.                                        iii
  175.                                     -------------------------------------
  176.                                     Chapter 1:  INTRODUCTION AND OVERVIEW
  177.                                     -------------------------------------
  178.  
  179.  
  180.         Section 1.1  Introduction
  181.  
  182.         The Blue  Wave Offline  Mail System Developer's Kit allows you to
  183.         create applications  that can process mail and reply packets that
  184.         are compatible  with The Blue Wave Offline Mail System.  Examples
  185.         of such applications include (but are not limited to):
  186.  
  187.              *    Mail readers  that can  display messages  within a
  188.                   Blue Wave  mail packet,  and allow users to create
  189.                   messages which  are then  stored in  a  Blue  Wave
  190.                   reply packet.
  191.  
  192.              *    Mail doors,  designed for online users of bulletin
  193.                   board systems  (BBSes), that  can create Blue Wave
  194.                   mail packets  for users  to download,  as well  as
  195.                   process Blue  Wave reply packets that are uploaded
  196.                   by users.
  197.  
  198.              *    Utilities that  can process  Blue  Wave  mail  and
  199.                   reply packets  in various  ways.  Examples include
  200.                   utilities to  merge mail packets together, convert
  201.                   mail packets  from one format to another (i.e. QWK
  202.                   to Blue  Wave or  Blue Wave  to QWK),  and extract
  203.                   messages from mail packets into ASCII text files.
  204.  
  205.         The Blue  Wave packet  format was  designed as a means to provide
  206.         advanced offline  mail  capabilities  in  an  easy-to-develop-for
  207.         design.  Initially created for the mail technology of the FidoNet
  208.         network, it  has been expanded to allow offline mail capabilities
  209.         for the global Internet network, and has plenty of room to expand
  210.         for the future.
  211.  
  212.  
  213.         Section 1.2  Overview of The Developer's Kit
  214.  
  215.         The following  files are  included in  The Blue Wave Offline Mail
  216.         System Developer's Kit:
  217.  
  218.              BLUEWAVE.H
  219.  
  220.                   Blue Wave  file structures  for C.    To  use  in  your
  221.                   applications, simply place:
  222.  
  223.                        #include "bluewave.h"
  224.  
  225.                   at the  start of  your program.   This header uses data
  226.                   types and  preprocessor directives  defined in the 1989
  227.                   ANSI/ISO C  standard, and should be compatible with any
  228.                   C compiler that conforms to the ANSI/ISO specification.
  229.                   In addition, the data types have been defined in such a
  230.  
  231.  
  232.                     ----------------------------------------
  233.                The Blue Wave Developer's Kit - Version 3 - Page 1
  234.                   way that  the header can be used in both 16-bit and 32-
  235.                   bit programs.
  236.  
  237.              BLUEWAVE.INC
  238.  
  239.                   Blue Wave  file structures for Turbo Pascal.  To use in
  240.                   your applications, simply place:
  241.  
  242.                        {$I bluewave.inc}
  243.  
  244.                   at the  start of  your program.   This header uses data
  245.                   types and other language features found only in Borland
  246.                   Turbo Pascal;  users of other Pascal compilers may need
  247.                   to make  modifications.   It has  been tested with both
  248.                   Turbo Pascal  and Borland  Pascal, versions 5.5 through
  249.                   7.0.
  250.  
  251.                   Note that the Turbo Pascal header is provided only as a
  252.                   convenience for  Pascal programmers.  Since all Cutting
  253.                   Edge Computing  products are written in C, little to no
  254.                   support for  Pascal programmers  can be  provided.  For
  255.                   all intents  and purposes,  Pascal programmers  are  on
  256.                   their own.
  257.  
  258.         The Blue Wave Offline Mail System Developer's Kit is designed for
  259.         the professional  programmer, one  who's been "around the block a
  260.         few times"  and knows his way around a compiler and the operating
  261.         system.   (We do  NOT recommend this developer's kit for the less
  262.         experienced programmer.)  As such, this document was written with
  263.         the professional  programmer in  mind.   It is  NOT a tutorial on
  264.         programming, compilers,  or operating  systems; that would be far
  265.         beyond the scope of this developer's kit.
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.                     ----------------------------------------
  292.                The Blue Wave Developer's Kit - Version 3 - Page 2
  293.                               -------------------------------------------
  294.                               Chapter 2:  A SHORT HISTORY OF OFFLINE MAIL
  295.                               -------------------------------------------
  296.  
  297.  
  298.         Before diving  into the specifics of the Blue Wave format, it may
  299.         be of  interest to  examine the  history of offline mail, and the
  300.         role Blue Wave plays in this little drama.  This will give you an
  301.         understanding of  where Blue  Wave came  from,  and  why  it  was
  302.         created.
  303.  
  304.  
  305.         Section 2.1  Necessity is a Mother...
  306.  
  307.         The concept  of offline  mail was  popularized in the late 1980s,
  308.         due mainly  to the ever-increasing popularity of networks such as
  309.         FidoNet and  RIME.  As the flow of mail increased, systems became
  310.         increasingly bogged  down as  users  spent  more  and  more  time
  311.         reading mail  online.  This presented problems for both users and
  312.         SysOps:   Users often  racked up  large phone  bills due  to  the
  313.         enormous amount  of time  they spent  online, and  SysOps  became
  314.         frustrated at  the fact  that fewer  and fewer users could access
  315.         their systems  (since users  were spending  more  and  more  time
  316.         online).  There HAD to be a better way.
  317.  
  318.         Fortunately, a  "better mousetrap"  would soon  become available:
  319.         Software  that   allowed  users  to  download  mail  bundles,  or
  320.         "packets", and  read them offline, on their own systems.  Replies
  321.         could then  be created,  stored in reply packets, and uploaded to
  322.         the BBS  the next  time the user was online.  This combination of
  323.         BBS (door)  and user  (reader) software  became known as "offline
  324.         mail systems",  and was  a godsend all around:  Users got a break
  325.         in their  phone bills,  and BBSes became less clogged with people
  326.         reading mail online, allowing more users to enjoy them.
  327.  
  328.  
  329.         Section 2.2  The Pioneers of Offline Mail
  330.  
  331.         Three gentlemen  from the FidoNet and RIME network communities --
  332.         Mike Ratledge,  Hector Santos,  and Mark  "Sparky" Herring -- are
  333.         generally regarded  as being  the pioneers of offline mail.  They
  334.         were the first to bring the concept to the masses.
  335.  
  336.              1)   Mike Ratledge  and XRS.   XRS, or Express Response
  337.                   System,   was    an   offline   mail   door/reader
  338.                   combination  for   the  QuickBBS   bulletin  board
  339.                   system.   XRS  became  quite  popular  within  the
  340.                   QuickBBS  community,   but  unfortunately,   never
  341.                   developed beyond  it.   Updates to XRS soon became
  342.                   few and  far between, and eventually, Mr. Ratledge
  343.                   officially ended development of XRS.
  344.  
  345.              2)   Hector Santos  and Silver  Xpress.   Like XRS, the
  346.                   Silver   Xpress    door/reader   combination   was
  347.                   originally written  for a  specific  BBS  package,
  348.  
  349.  
  350.                     ----------------------------------------
  351.                The Blue Wave Developer's Kit - Version 3 - Page 3
  352.                   (Opus;  in  fact,  Silver  Xpress  was  originally
  353.                   called Opus  Xpress).   Unlike XRS,  however,  the
  354.                   Silver Xpress  software  line  branched  out  into
  355.                   other BBS  packages, and  has become quite popular
  356.                   with users.   Software developers, however, do not
  357.                   enjoy that  popularity,  as  the  advanced  Silver
  358.                   Xpress packet  format is proprietary.  As such, no
  359.                   third-party doors,  readers, or  utilities can  be
  360.                   created that  will work  with Silver  Xpress  mail
  361.                   packets, and  limits Silver  Xpress to  only those
  362.                   software and hardware platforms that are supported
  363.                   by Santronics Software.
  364.  
  365.              3)   Mark "Sparky"  Herring and  QWK.    The  QWK  mail
  366.                   format was  developed  out  of  the  message  base
  367.                   format used  by the  PCBoard BBS software, and was
  368.                   used by  Mr. Herring  to create a door (Qmail) and
  369.                   reader  (DeLuxe2,   then  1st   Reader)  for   it.
  370.                   Eventually, the  format of QWK mail packets became
  371.                   widely known,  and many  QWK-compatible doors  and
  372.                   readers sprang  into existence,  making QWK one of
  373.                   the most  popular formats  available  for  offline
  374.                   mail.  Unfortunately, there is a down side to QWK,
  375.                   which will be explained shortly.
  376.  
  377.  
  378.         Section 2.3  Open Standards and the Blue Wave Format
  379.  
  380.         The availability of an open standard for offline mail has several
  381.         advantages, the  main one  being that  anyone can  create a door,
  382.         reader, or utility which processes mail packets in such a format.
  383.         It's not restricted to one person or platform.
  384.  
  385.         The QWK  format is  one such format; to date, there are dozens of
  386.         doors, readers,  and utilities  that support QWK.  Unfortunately,
  387.         the format  has one  rather glaring drawback, in that there is no
  388.         consistency to  it.   Mark Herring  never officially released the
  389.         specifications for  the QWK format to the public; by all reports,
  390.         it was  "hacked out" by several people.  As such, much of what is
  391.         supposed to  be done  to create a QWK mail packet is left open to
  392.         interpretation.   Also, QWK  was never  designed  to  handle  the
  393.         complexities of  mail from  such  networks  as  FidoNet  and  the
  394.         Internet (as  mentioned earlier, QWK was derived from the PCBoard
  395.         message base  format, and  PCBoard did  not support  FidoNet  and
  396.         Internet mail  until very recently).  Because of this, authors of
  397.         QWK  products   took  it   upon  themselves   to  add  their  own
  398.         enhancements and extensions to the format, most of which conflict
  399.         with each other.  The result is that the "QWK standard" is hardly
  400.         a standard  at all,  and anyone  who wishes to write a program to
  401.         fully handle  QWK packets  must go  through lots  of  programming
  402.         gymnastics to support all the variations.
  403.  
  404.         Enter the  Blue Wave  format.   The Blue Wave Offline Mail System
  405.         was  developed   by  George   Hatchew  in  1990,  after  becoming
  406.         dissatisfied with  the offline mail system offerings of the time.
  407.  
  408.  
  409.                     ----------------------------------------
  410.                The Blue Wave Developer's Kit - Version 3 - Page 4
  411.         For several years, the Blue Wave format was as proprietary as the
  412.         XRS and  Silver Xpress  formats, until Mr. Hatchew decided to add
  413.         QWK packet support to his reader.  He then became painfully aware
  414.         of the many problems inherent in the QWK format, and decided:
  415.  
  416.              1)   That a  more powerful  format needed  to  be  made
  417.                   available to the public, one that would handle the
  418.                   many complexities  of current  mail systems, while
  419.                   at  the  same  time  be  easy  for  developers  to
  420.                   implement.
  421.  
  422.              2)   That  control   over   future   enhancements   and
  423.                   development of  the format be retained by a single
  424.                   party, in  order to  avoid the  same chaos that is
  425.                   rampant in the QWK developer community.
  426.  
  427.         Thus, Mr.  Hatchew decided to make the newly-overhauled Blue Wave
  428.         format  available  to  third-party  developers,  subject  to  the
  429.         condition that  any enhancements or modifications be approved and
  430.         made ONLY  by him (to prevent the Blue Wave format from receiving
  431.         the same "hatchet job" that the QWK format has undergone).  Since
  432.         that time,  over two  dozen Blue  Wave compatible doors, readers,
  433.         and utilities  have  been  created,  covering  a  wide  range  of
  434.         hardware (IBM  PC, Macintosh,  Amiga) and  operating systems (MS-
  435.         DOS, Microsoft  Windows, OS/2,  MacOS),  with  more  applications
  436.         arriving all the time.  In addition, several BBS programs are now
  437.         including Blue  Wave offline  mail as an integral part of the BBS
  438.         software, with more sure to follow.
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.                     ----------------------------------------
  469.                The Blue Wave Developer's Kit - Version 3 - Page 5
  470.                              --------------------------------------------
  471.                              Chapter 3:  DESCRIPTION OF BLUE WAVE PACKETS
  472.                              --------------------------------------------
  473.  
  474.  
  475.         Any discussion  of  the  Blue  Wave  format  must  begin  with  a
  476.         description  of   the  concepts  of  "mail  packets"  and  "reply
  477.         packets", as  well as  the individual  files found in both.  Such
  478.         information is essential to understanding the Blue Wave format as
  479.         a whole.
  480.  
  481.  
  482.         Section 3.1  Filename Conventions
  483.  
  484.         The Blue  Wave Offline  Mail System  was originally developed for
  485.         IBM PC  and compatible  computer systems  running  MS-DOS  (or  a
  486.         compatible operating  system such  as PC-DOS  or Novell DOS).  As
  487.         such, the  Blue Wave  format revolves  around  the  DOS  filename
  488.         convention:   One to  eight characters,  followed by  an optional
  489.         period and  up to three additional characters (the "DOS filename"
  490.         or "8.3 filename" format).
  491.  
  492.         Other operating  systems, such  as OS/2,  Windows NT, and Windows
  493.         95, allow filenames that can be up to 255 characters long, and do
  494.         not have  to conform to the DOS filename convention.  However, in
  495.         order to  keep mail and reply packets compatible with DOS systems
  496.         -- still  the most  widely available, and thus the "lowest common
  497.         denominator" --  the Blue  Wave  format  requires  that  the  DOS
  498.         filename convention be used, even on systems that don't have this
  499.         limitation.
  500.  
  501.         Finally, DOS  filenames can  consist  of  letters,  numbers,  and
  502.         several punctuation  characters.  However, if you plan to write a
  503.         Blue Wave  compatible application  that will create packets which
  504.         will be used on non-DOS systems, you should keep in mind the fact
  505.         that some  systems might  not be  able to  handle any  characters
  506.         other than  letters and  numbers.   (This is  especially true for
  507.         ASCII characters  128 through 255, which DOS will allow but other
  508.         systems almost certainly will not.  You should therefore consider
  509.         these characters to be strictly off limits.)
  510.  
  511.  
  512.         Section 3.2  The Packet ID
  513.  
  514.         Blue Wave  mail and  reply packets  revolve around what is called
  515.         the "packet  ID".   This is  a string of one to eight characters,
  516.         and serves  as a  unique identifier  for each host system.  It is
  517.         mainly used  to create  the filenames for mail and reply packets,
  518.         and the  data files  contained within  each.   (For example,  the
  519.         packet ID for The Wild! Blue BBS is "WILDBLUE".)
  520.  
  521.  
  522.         Section 3.3  The Blue Wave Mail Packet
  523.  
  524.  
  525.  
  526.  
  527.                     ----------------------------------------
  528.                The Blue Wave Developer's Kit - Version 3 - Page 6
  529.         A Blue  Wave mail  packet actually consists of several files, all
  530.         bundled together  into an  archive file.  (It is assumed that you
  531.         are already  familiar with  archiving utilities, such as PKWare's
  532.         PKZIP and PKUNZIP.)  The mail packet is created on a host system,
  533.         and contains messages selected by the user to be read offline.
  534.  
  535.         Mail packets  consist of  the following  data files ("<packetid>"
  536.         refers to the packet ID used by the host system):
  537.  
  538.              <packetid>.INF
  539.  
  540.                   Contains information  about the  host system,  the user
  541.                   who requested  the mail  packet, and  the message areas
  542.                   available on the host system.
  543.  
  544.              <packetid>.FTI
  545.  
  546.                   Contains  the   header  information  for  each  message
  547.                   obtained  from   the  host  system.    The  information
  548.                   contained in  the headers  include the person who wrote
  549.                   the message  (the "From" field), the person to whom the
  550.                   message was addressed (the "To:" field), and so on.
  551.  
  552.              <packetid>.MIX
  553.  
  554.                   An index  file designed  to  provide  quick  access  to
  555.                   messages within the mail packet.
  556.  
  557.              <packetid>.DAT
  558.  
  559.                   The text of each message obtained from the host system.
  560.  
  561.         Optionally, some additional files may also be present in the mail
  562.         packet.  These files include:
  563.  
  564.              Text files containing bulletins and other announcements
  565.              from the  host system.  They can either be specified in
  566.              the *.INF  file, or  be present as files named "BLT*.*"
  567.              (any filename  is valid,  so long  as  it  begins  with
  568.              "BLT") or  "*.TXT" (i.e. any filename with an extension
  569.              of .TXT).   The methods used to display these bulletins
  570.              is up to the programmer.
  571.  
  572.              A file  called "NEWFILES.*" (any extension is valid), a
  573.              text file  listing all new files available for download
  574.              from the host system.  The methods used to display this
  575.              list is up to the programmer.
  576.  
  577.         The filename  to be  used for mail packets consists of the packet
  578.         ID, followed by an extension in one of two formats:
  579.  
  580.              DAY OF WEEK    Comprised of the first two characters of
  581.                             the weekday  name, followed  by a  digit
  582.                             from 0  to 9.  Examples:  SU1, MO4, TH0,
  583.                             FR9.   Keeping track  of the  next valid
  584.  
  585.  
  586.                     ----------------------------------------
  587.                The Blue Wave Developer's Kit - Version 3 - Page 7
  588.                             digit to  be  used  for  a  user's  mail
  589.                             packet is up to the programmer.
  590.  
  591.              NUMERIC        Comprised  of   a  one  to  three  digit
  592.                             number, i.e.  0-9,  00-99,  or  000-999.
  593.                             (Using a  three digit  number is  highly
  594.                             recommended.)  Keeping track of the next
  595.                             valid number  to be  used for  a  user's
  596.                             mail packet is up to the programmer.
  597.  
  598.         Some examples  of mail  packet  filenames  are  WILDBLUE.SU0  and
  599.         WILDBLUE.019.
  600.  
  601.  
  602.         Section 3.4  The Blue Wave Reply Packet
  603.  
  604.         A Blue  Wave reply packet actually consists of several files, all
  605.         bundled together  into an  archive file.   It  is created  by the
  606.         offline reader,  and contains  messages written  by the user that
  607.         are to be uploaded to a host system.
  608.  
  609.         Reply packets  consist of  the following data files ("<packetid>"
  610.         refers to the packet ID used by the host system):
  611.  
  612.              <packetid>.UPL
  613.  
  614.                   Contains information  about the  reader, as well as the
  615.                   header information  and  the  filename  containing  the
  616.                   message text  (see below) for each message in the reply
  617.                   packet.
  618.  
  619.              <filename>
  620.  
  621.                   A text  file containing  the text  of a  reply message.
  622.                   Each reply message is stored in its own individual text
  623.                   file, and  each text  file can  only correspond  to ONE
  624.                   reply message  (that is,  one text  file cannot be used
  625.                   for multiple reply messages).  The names used for these
  626.                   files is up to the programmer.
  627.  
  628.         In addition,  one of  more of the following optional files may be
  629.         contained in the reply packet:
  630.  
  631.              <packetid>.REQ
  632.  
  633.                   Contains a  list of  files  that  the  user  wishes  to
  634.                   download from  the host  system.  The procedure used to
  635.                   actually  download  requested  files  is  left  to  the
  636.                   programmer.
  637.  
  638.              <packetid>.OLC
  639.  
  640.                   Contains information used to configure the offline mail
  641.                   features on  the host  system.   Also known as "offline
  642.                   configuration" or "door configuration".  The *.OLC file
  643.  
  644.  
  645.                     ----------------------------------------
  646.                The Blue Wave Developer's Kit - Version 3 - Page 8
  647.                   is  a   plain  text  file,  making  it  easier  to  add
  648.                   enhancements and extensions.
  649.  
  650.         The following files are now officially obsolete, but door authors
  651.         may still need to write code to handle them:
  652.  
  653.              <packetid>.UPI
  654.  
  655.                   Contains information  about the  reader, as well as the
  656.                   header information  and  the  filename  containing  the
  657.                   message text  for each NON-NETMAIL message in the reply
  658.                   packet.
  659.  
  660.              <packetid>.NET
  661.  
  662.                   Contains  the   header  information  and  the  filename
  663.                   containing the message text for each NetMail message in
  664.                   the reply packet.
  665.  
  666.              <packetid>.PDQ
  667.  
  668.                   Contains information used to configure the offline mail
  669.                   features on the host system.
  670.  
  671.         The functions of the *.UPI and *.NET files were combined into the
  672.         *.UPL file.   The  limited *.PDQ  file was  replaced by  the more
  673.         extensible *.OLC  file (the  latter being  a plain text file, and
  674.         hence easier to add updates and new features).
  675.  
  676.         The filename  of the  reply packet  consists of the packet ID and
  677.         the extension  ".NEW".   For example, a reply packet destined for
  678.         The Wild! Blue BBS would be assigned the name "WILDBLUE.NEW".
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.                     ----------------------------------------
  705.                The Blue Wave Developer's Kit - Version 3 - Page 9
  706.                          ------------------------------------------------
  707.                          Chapter 4:  FILE STRUCTURE TECHNICAL INFORMATION
  708.                          ------------------------------------------------
  709.  
  710.  
  711.         This chapter goes into the technical details behind the Blue Wave
  712.         file structures.   Such  details include  the data types that are
  713.         used and  how they're stored in the structure, how the structures
  714.         are defined  in programs, "big endian" versus "little endian" CPU
  715.         architectures, and reserved fields in the structures.
  716.  
  717.  
  718.         Section 4.1  Data Types
  719.  
  720.         The following data types are used in the structure definitions:
  721.  
  722.              tBYTE     An unsigned  8-bit integer.  Allowable values
  723.                        range from 0 to 255.
  724.  
  725.              tCHAR     An unsigned  8-bit integer.  Allowable values
  726.                        range from 0 to 255.  Used to define an array
  727.                        of  ASCII   characters,   aka   a   "string".
  728.                        (Strings are  stored in  C fashion:   Zero or
  729.                        more characters  terminated with  an ASCII  0
  730.                        character.)
  731.  
  732.              tINT      A signed  16-bit integer.   Allowable  values
  733.                        range from -32,768 to 32,767.
  734.  
  735.              tWORD     An unsigned 16-bit integer.  Allowable values
  736.                        range from 0 to 65,535.
  737.  
  738.              tLONG     A signed  32-bit integer.   Allowable  values
  739.                        range from -2,147,483,648 to 2,147,483,647.
  740.  
  741.              tDWORD    An unsigned 32-bit integer.  Allowable values
  742.                        range from 0 to 4,294,967,295.
  743.  
  744.         Since the  Blue Wave  format was  originally designed for the IBM
  745.         Personal Computer  and compatible  systems, multi-byte data types
  746.         (tINT, tWORD, tLONG, and tDWORD) are expected to be stored in the
  747.         format used  by the  Intel 80x86  CPU.   This  format  is  called
  748.         "little endian", and specifies that the least significant byte is
  749.         to be stored first, followed by the next significant byte, and so
  750.         on.   However, some  CPUs --  such as the Motorola 68000 -- store
  751.         multi-byte data  types in  the exact  opposite way (known as "big
  752.         endian" format).   Using  the Blue  Wave  structures  on  a  "big
  753.         endian" CPU will be discussed in a moment.
  754.  
  755.  
  756.         Section 4.2  Using the File Structures
  757.  
  758.         As explained  in section 1.2, the file structures are provided as
  759.         a header  file for  use with  the C  programming  language.    To
  760.  
  761.  
  762.  
  763.                     ----------------------------------------
  764.                The Blue Wave Developer's Kit - Version 3 - Page 10
  765.         include the  header file  into your  program,  simply  place  the
  766.         statement:
  767.  
  768.              #include "bluewave.h"
  769.  
  770.         at the start of your source file.
  771.  
  772.         Each file  structure is  defined as a C data structure ("struct")
  773.         via the  "typedef" directive.   This  makes  it  easy  to  define
  774.         variables and pointers in your programs.  For example:
  775.  
  776.              INF_HEADER infhdr;
  777.  
  778.         defines the  "infhdr"  variable  as  a  data  structure  of  type
  779.         INF_HEADER.  (Again, it is assumed that you are familiar with the
  780.         C language  and the concepts of structures, type definitions, and
  781.         so forth.)
  782.  
  783.         Accessing fields in the data structures is accomplished just like
  784.         any other  C variable  or data  structure.   However, if  you are
  785.         programming for a "big endian" CPU, you have an additional chore:
  786.         Converting data  types between  "little endian" and "big endian".
  787.         First off,  place the  following line  in your program BEFORE you
  788.         include the header file, like so:
  789.  
  790.              #define BIG_ENDIAN
  791.              #include "bluewave.h"
  792.  
  793.         This will  define the  16-bit and  32-bit data types as arrays of
  794.         bytes.   You must  then write  functions that  will convert these
  795.         fields from  "little endian"  to "big endian" and back again, and
  796.         use these functions whenever you access a structure field.
  797.  
  798.         Finally, all  structures must  be stored in "packed" format; that
  799.         is, the  compiler must not insert padding between the data fields
  800.         in order  to force  those fields  onto CPU word boundaries.  Most
  801.         Intel compilers  default to "packed" mode, but if yours does not,
  802.         you must  use the  appropriate compiler  commands or preprocessor
  803.         directives to  set "packed" mode before including the header file
  804.         in your  program.   If this  is not  done, mail and reply packets
  805.         generated by  your program  will not  be compatible with the vast
  806.         majority of Blue Wave compatible programs.
  807.  
  808.  
  809.         Section 4.3  Using the Structure Length Fields
  810.  
  811.         Several of  the file  structures include  fields that  define the
  812.         lengths of  the other  structures used in mail and reply packets.
  813.         These fields  are used  to ensure  that programs  can use  future
  814.         versions of the structures without breaking.
  815.  
  816.         Authors should  take the  time to add the few extra lines of code
  817.         needed to  fill in  the structure  length fields,  and take  into
  818.         account (when  reading mail and reply packets) the possibility of
  819.         extensions to  the file structures.  If the structures are LONGER
  820.  
  821.  
  822.                     ----------------------------------------
  823.                The Blue Wave Developer's Kit - Version 3 - Page 11
  824.         than  expected,   simply  perform  a  seek()  to  move  past  the
  825.         additional information to the next record.  If the structures are
  826.         SHORTER than  expected --  a situation  which you  should  almost
  827.         never encounter, but is nevertheless possible -- a simple "please
  828.         upgrade your  door [or reader]" should suffice, as any additional
  829.         information that  is sent  in the structure probably would not be
  830.         crucial, and you will most likely be able to continue without it.
  831.  
  832.         (It should  be noted  that all  versions of The Blue Wave Offline
  833.         Mail Door  prior to  version 3.00  set these fields to 0, as this
  834.         extensibility was  not added  to the  Blue Wave  format until the
  835.         3.00 series  was released.  If the structure length fields are 0,
  836.         applications should  assume that  all records  are of  the  sizes
  837.         defined as  the "ORIGINAL_xxx_LEN" macros.  Note that there is no
  838.         definition for  the original  length of  the *.UPL structures, as
  839.         the pre-3.00 doors did not recognize *.UPL files.)
  840.  
  841.         An example  of how  to use these structure length fields is given
  842.         in the  comments at the start of the header file.  A snippet of C
  843.         code not  only demonstrates the length fields, but the use of the
  844.         ORIGINAL_xxx_LEN macros as well.
  845.  
  846.  
  847.         Section 4.4  Unused and Reserved Fields
  848.  
  849.         There are  plenty of  fields in the Blue Wave structures that are
  850.         not yet  being used,  and are  marked as "reserved" in the header
  851.         file.   THESE AREAS  ARE NOT TO BE USED BY PROGRAMMERS.  They are
  852.         reserved for future expansion of the Blue Wave format, and if you
  853.         use them  for your  own purposes,  you run  the very real risk of
  854.         making your program incompatible with future versions of the Blue
  855.         Wave format.
  856.  
  857.         Future updates  of the  Blue Wave structures will assume that any
  858.         unused fields  (including unused  bits in  bit-flag  fields)  are
  859.         "garbage free"  (i.e. filled  with binary zeroes).  To accomplish
  860.         this, you  should use  the memset()  function  to  zero  out  the
  861.         structure before adding information to it.  For example, using:
  862.  
  863.              memset(&inf_record, 0, sizeof(INF_AREA_INFO));
  864.  
  865.         prior to  putting information into the structure will ensure that
  866.         programs using  future versions  of the structures will not break
  867.         on packets created by programs using older structures.
  868.  
  869.         Again, WE  CANNOT STRESS HIGHLY ENOUGH THE IMPORTANCE OF ENSURING
  870.         THAT UNUSED  FIELDS ARE  CLEARED TO  BINARY ZERO!   Get  into the
  871.         habit of zeroing out structures before adding information to them
  872.         and writing  them to disk; a little work now will save everyone a
  873.         whole lot of grief in the long run.
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.                     ----------------------------------------
  882.                The Blue Wave Developer's Kit - Version 3 - Page 12
  883.                            ----------------------------------------------
  884.                            Chapter 5:  BLUE WAVE FORMAT DETAILED ANALYSIS
  885.                            ----------------------------------------------
  886.  
  887.  
  888.         This chapter  goes into detail on each file in the Blue Wave mail
  889.         and reply  packets; the  file structures that comprise each file;
  890.         and the fields in each file structure.
  891.  
  892.  
  893.         Section 5.1  The *.INF File
  894.  
  895.         The *.INF  file consists of two parts:  A single required header,
  896.         and zero  or more  message area information records corresponding
  897.         to each area on the host system to which the user has access.
  898.  
  899.         Note that  ALL message areas to which the user has access MUST be
  900.         included in the *.INF file.  The only time an area can be omitted
  901.         is if  the user  does not  have access  to that  area on the host
  902.         system.   This is  necessary in  order for the user to be able to
  903.         add and/or drop message areas via offline configuration.
  904.  
  905.         The header  is called  INF_HEADER,  and  contains  the  following
  906.         fields:
  907.  
  908.              ver
  909.  
  910.                   The version  of the  Blue Wave format being used.  This
  911.                   value can  be obtained  using  the  PACKET_LEVEL  macro
  912.                   defined in the header file.
  913.  
  914.              readerfiles[]
  915.  
  916.                   An array specifying the filenames of the bulletin files
  917.                   included in  the packet by the host system.  The method
  918.                   used to  display these  files is  up to the programmer.
  919.                   Up to 5 files can be specified.
  920.  
  921.              regnum
  922.  
  923.                   Used by  The Blue  Wave Offline  Mail Door to store the
  924.                   registration code  of the  door.   Third-party  authors
  925.                   should ignore this field.
  926.  
  927.              mashtype
  928.  
  929.                   Used by  The Blue Wave Offline Mail Reader to store the
  930.                   compression type of the mail packet archive.
  931.  
  932.              loginname
  933.  
  934.                   The name  used by  the user when logging on to the host
  935.                   system.   This is  usually the user's real name.  Doors
  936.                   are required to fill this field.
  937.  
  938.  
  939.  
  940.                     ----------------------------------------
  941.                The Blue Wave Developer's Kit - Version 3 - Page 13
  942.              aliasname
  943.  
  944.                   An alternate  name used by the user on the host system.
  945.                   This is usually the user's alias, or "handle".  If this
  946.                   field is  empty, it  usually means that the host system
  947.                   does not  support alternate  names, and  the  loginname
  948.                   field should be used instead.
  949.  
  950.              password
  951.  
  952.                   The password  required to access the mail packet.  As a
  953.                   simple security measure, each character of the password
  954.                   is stored as the ASCII value plus 10.
  955.  
  956.              passtype
  957.  
  958.                   A value  indicating the  type of  password specified in
  959.                   the  password  field.    0  indicates  no  password,  1
  960.                   indicates  a   door  password,  2  indicates  a  reader
  961.                   password, and  3 indicates  both a  door and  a  reader
  962.                   password.
  963.  
  964.              zone, net, node, point
  965.  
  966.                   These  four  fields  make  up  the  main  FidoNet-style
  967.                   network address of the host system.  If the host system
  968.                   does not  have a  FidoNet-style address,  these  fields
  969.                   should be set to 0.
  970.  
  971.              sysop
  972.  
  973.                   The name of the SysOp of the host system.
  974.  
  975.              ctrl_flags
  976.  
  977.                   Bit-mapped flags  that control  certain features of the
  978.                   reader.   Refer to  the  header  file  for  a  list  of
  979.                   available flags.
  980.  
  981.              systemname
  982.  
  983.                   The name of the host system.
  984.  
  985.              maxfreqs
  986.  
  987.                   The maximum  number of  files that the user may request
  988.                   from the  host system.  (This field is intended for use
  989.                   with the reader's offline file request feature.)
  990.  
  991.              is_QWK
  992.  
  993.                   Normally, the  Blue Wave  reader stores  a copy  of the
  994.                   *.INF file  each time a mail packet is open, so that it
  995.                   can process  reply packets  without the  need to open a
  996.                   mail packet.   QWK  mail packets,  however, do not have
  997.  
  998.  
  999.                     ----------------------------------------
  1000.                The Blue Wave Developer's Kit - Version 3 - Page 14
  1001.                   *.INF files,  thus the Blue Wave reader creates one and
  1002.                   sets this  flag.   This way,  the reader  will properly
  1003.                   access the  *.REP reply  packet (instead  of trying  to
  1004.                   access a Blue Wave format *.NEW reply packet).
  1005.  
  1006.              uflags
  1007.  
  1008.                   Bit-mapped flags  that indicate  the options enabled by
  1009.                   the user  on the  host system  mail door.  Refer to the
  1010.                   header file for a list of available flags.  (This field
  1011.                   is  intended   for  use   with  the   reader's  offline
  1012.                   configuration feature.)
  1013.  
  1014.              keywords[]
  1015.  
  1016.                   An array  specifying the mail bundling keywords defined
  1017.                   by the  user on  the host  system mail  door.  Up to 10
  1018.                   keywords may be specified.  (This field is intended for
  1019.                   use with the reader's offline configuration feature.)
  1020.  
  1021.              filters[]
  1022.  
  1023.                   An array  specifying the  mail bundling filters defined
  1024.                   by the  user on  the host  system mail  door.  Up to 10
  1025.                   filters may  be specified.  (This field is intended for
  1026.                   use with the reader's offline configuration feature.)
  1027.  
  1028.              macros[]
  1029.  
  1030.                   An array specifying the mail bundling macros defined by
  1031.                   the user  on the host system mail door.  Up to 3 macros
  1032.                   may be specified.  (This field is intended for use with
  1033.                   the reader's offline configuration feature.)
  1034.  
  1035.              netmail_flags
  1036.  
  1037.                   Bit-mapped flags  indicating the  NetMail status  flags
  1038.                   that the user is allowed to specify on NetMail messages
  1039.                   sent through the host system.  Refer to the header file
  1040.                   for a list of available flags.
  1041.  
  1042.              credits
  1043.  
  1044.                   The current amount of NetMail credit accumulated by the
  1045.                   user on the host system.
  1046.  
  1047.              debits
  1048.  
  1049.                   The current  amount of NetMail debit accumulated by the
  1050.                   user on the host system.
  1051.  
  1052.              can_forward
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.                     ----------------------------------------
  1059.                The Blue Wave Developer's Kit - Version 3 - Page 15
  1060.                   A flag  that indicates  if the  host system  allows the
  1061.                   user to  forward messages.   A non-zero value indicates
  1062.                   that forwarding is allowed.
  1063.  
  1064.              inf_header_len
  1065.  
  1066.                   Indicates the size of the INF_HEADER structure.
  1067.  
  1068.              inf_areainfo_len
  1069.  
  1070.                   Indicates the size of the INF_AREA_INFO structure.
  1071.  
  1072.              mix_structlen
  1073.  
  1074.                   Indicates the size of the MIX_REC structure.
  1075.  
  1076.              fti_structlen
  1077.  
  1078.                   Indicates the size of the FTI_REC structure.
  1079.  
  1080.              uses_upl_file
  1081.  
  1082.                   A flag  that indicates  if the host system can handle a
  1083.                   *.UPL file  in the  reply packet.    A  non-zero  value
  1084.                   indicates that *.UPL files are supported.
  1085.  
  1086.                   Note that  version 3  and later of the Blue Wave format
  1087.                   requires the use and support of *.UPL files.
  1088.  
  1089.              from_to_len
  1090.  
  1091.                   The maximum length of the From: and To: fields that the
  1092.                   host system  can support.   If  this value is 0, then a
  1093.                   value of 35 must be assumed (35 characters is the limit
  1094.                   in the Blue Wave reply header).
  1095.  
  1096.              subject_len
  1097.  
  1098.                   The maximum  length of the Subject: field that the host
  1099.                   system can  support.   If this value is 0, then a value
  1100.                   of 71  must be  assumed (71  characters is the limit in
  1101.                   the Blue Wave reply header).
  1102.  
  1103.              packet_id
  1104.  
  1105.                   The host  system packet  ID.   This is provided so that
  1106.                   even if  the mail  or  reply  packets  are  renamed  to
  1107.                   something completely  different, doors and readers will
  1108.                   still be  able to work with the proper files (the files
  1109.                   inside the  mail and reply packets use the packet ID as
  1110.                   part of the filename).
  1111.  
  1112.                   Note that  this field  was not  supported until version
  1113.                   3.00 of The Blue Wave Offline Mail Door.  If this field
  1114.  
  1115.  
  1116.  
  1117.                     ----------------------------------------
  1118.                The Blue Wave Developer's Kit - Version 3 - Page 16
  1119.                   is empty,  reader authors  should assume  that the root
  1120.                   name of the *.INF filename is the packet ID.
  1121.  
  1122.              file_list_type
  1123.  
  1124.                   Indicates the  type of  new file list that is generated
  1125.                   by the  host system.   Refer  to the  header file for a
  1126.                   list of  valid types.   (This field is intended for use
  1127.                   with the reader's offline configuration feature.)
  1128.  
  1129.              auto_macro[]
  1130.  
  1131.                   An array of flags specifying which of the macros in the
  1132.                   macros[] array  are auto-macros (i.e. the door executes
  1133.                   them automatically  every time  a user  requests a mail
  1134.                   packet be bundled for download).  Up to three flags may
  1135.                   be specified,  each corresponding  to the three entries
  1136.                   in the macros[] array.  A non-zero value indicates that
  1137.                   a particular  macro is  an auto-macro.   (This field is
  1138.                   intended   for    use   with   the   reader's   offline
  1139.                   configuration feature.)
  1140.  
  1141.              max_packet_size
  1142.  
  1143.                   Specifies the  maximum size  (in kilobytes) allowed for
  1144.                   an uncompressed  mail packet.   A  zero value specifies
  1145.                   that there  is no limit to the maximum size of the mail
  1146.                   packet.   (This field  is intended  for  use  with  the
  1147.                   reader's offline configuration feature.)
  1148.  
  1149.         The message  area information record is called INF_AREA_INFO, and
  1150.         contains the following fields:
  1151.  
  1152.              areanum
  1153.  
  1154.                   The area  number on the host system.  The string placed
  1155.                   in this  field may  (and usually  will) correspond to a
  1156.                   numeric  value;  some  systems  may  allow  non-numeric
  1157.                   characters as  an area  identifier, which  is perfectly
  1158.                   legal.  Duplicate area numbers are not allowed.
  1159.  
  1160.                   Doors must  place the  value contained  here  into  the
  1161.                   *.MIX index  file record  (discussed later).    Readers
  1162.                   normally won't  need to  use this field, except perhaps
  1163.                   when displaying the list of message areas to the user.
  1164.  
  1165.              echotag
  1166.  
  1167.                   A tag  name that  uniquely identifies the message area.
  1168.                   Duplicate tag  names are  not allowed.    (For  FidoNet
  1169.                   EchoMail areas,  we recommend  using the  EchoMail  tag
  1170.                   name, as they are also required to be unique.)
  1171.  
  1172.                   Readers will  use this field when generating records in
  1173.                   the *.UPL reply file (discussed later).  Doors can then
  1174.  
  1175.  
  1176.                     ----------------------------------------
  1177.                The Blue Wave Developer's Kit - Version 3 - Page 17
  1178.                   use the value to ensure that messages are posted to the
  1179.                   proper message  areas (if,  for example,  the SysOp has
  1180.                   added, deleted,  or moved  message areas  around on the
  1181.                   host system).
  1182.  
  1183.              title
  1184.  
  1185.                   A short  description of  the message  area.   Most host
  1186.                   systems will  provide this information; if not, you can
  1187.                   probably use the value in the "echotag" field.
  1188.  
  1189.              area_flags
  1190.  
  1191.                   Bit-mapped flags indicating the status and usage of the
  1192.                   message area.   Refer  to the header file for a list of
  1193.                   available flags.
  1194.  
  1195.              network_type
  1196.  
  1197.                   Indicates the type of network to which messages in this
  1198.                   area belong.   Refer  to the  header file for a list of
  1199.                   available network  types.   (Currently, the  Blue  Wave
  1200.                   format supports the FidoNet and Internet networks.)
  1201.  
  1202.  
  1203.         Section 5.2  The *.MIX File
  1204.  
  1205.         The  *.MIX   file  consists   of  zero   or  more  records,  each
  1206.         corresponding to  a message  area listed in the *.INF file.  Each
  1207.         *.MIX record  contains information  on the  number of messages in
  1208.         each area,  as well  as the  offset in  the *.FTI file (described
  1209.         later) to the start of the message headers for each area.
  1210.  
  1211.         The index  record is  called MIX_REC,  and contains the following
  1212.         fields:
  1213.  
  1214.              areanum
  1215.  
  1216.                   The area  number on  the host  system.  This field must
  1217.                   contain the  same value  as the  corresponding field in
  1218.                   the *.INF record.
  1219.  
  1220.              totmsgs
  1221.  
  1222.                   The total  number of  messages in the area.  (Note that
  1223.                   this is  the number  of messages  that were  downloaded
  1224.                   from the host system.)
  1225.  
  1226.              numpers
  1227.  
  1228.                   The total  number of  personal messages  (i.e. messages
  1229.                   addressed to the user) in the area.
  1230.  
  1231.              msghptr
  1232.  
  1233.  
  1234.  
  1235.                     ----------------------------------------
  1236.                The Blue Wave Developer's Kit - Version 3 - Page 18
  1237.                   The offset  (in bytes)  in the  *.FTI  file  (described
  1238.                   later) to  the start  of message  headers for the area.
  1239.                   This allows readers to quickly find the message headers
  1240.                   for the  area, rather  than having  to scan through the
  1241.                   entire *.FTI  file for them.  (If there are no messages
  1242.                   in the  area, this  field is  irrelevant, and should be
  1243.                   ignored by readers.)
  1244.  
  1245.  
  1246.         Section 5.3  The *.FTI File
  1247.  
  1248.         The *.FTI  file contains  the header information for each message
  1249.         downloaded from  the host system.  This includes the names of the
  1250.         persons who wrote the messages and who they are addressed to, the
  1251.         date and  time each message was written, and the offsets into the
  1252.         *.DAT file (discussed later) for the text of each message.
  1253.  
  1254.         Note that  message headers  for each  area must be in area number
  1255.         order, and  all messages  for an  area must  be grouped together.
  1256.         That is,  all headers  for the  first message area will appear in
  1257.         the *.FTI  file first,  followed by  the headers  for the  second
  1258.         area, then the third area, and so on.
  1259.  
  1260.         The message  header record  is called  FTI_REC, and  contains the
  1261.         following fields:
  1262.  
  1263.              from
  1264.  
  1265.                   The name of the person who wrote the message.
  1266.  
  1267.                   For  Internet  E-mail  messages  and  Usenet  newsgroup
  1268.                   articles, this  field should  contain the  name derived
  1269.                   from the  "From:" line  in the  RFC  header,  which  is
  1270.                   usually in one of the following formats:
  1271.  
  1272.                        From: George Hatchew <bwave@ibm.net>
  1273.                        From: bwave@ibm.net (George Hatchew)
  1274.  
  1275.                   and may or may not be contained within quote marks.  If
  1276.                   the name  cannot be accurately determined, the Internet
  1277.                   address can  be used  instead.   (Refer to section 5.4,
  1278.                   "The *.DAT File", for information on preserving the RFC
  1279.                   header for Internet messages.)
  1280.  
  1281.              to
  1282.  
  1283.                   The  name   of  the  person  to  whom  the  message  is
  1284.                   addressed.
  1285.  
  1286.                   For Usenet newsgroup articles, the text "All" should be
  1287.                   placed in  this  field,  as  Usenet  articles  are  not
  1288.                   addressed to specific individuals.  For Internet E-mail
  1289.                   messages, this  field should  contain the  name derived
  1290.                   from the "To:" line in the RFC header, which is usually
  1291.                   in one of the following formats:
  1292.  
  1293.  
  1294.                     ----------------------------------------
  1295.                The Blue Wave Developer's Kit - Version 3 - Page 19
  1296.  
  1297.                        To: George Hatchew <bluewave@cris.com>
  1298.                        To: bluewave@cris.com (George Hatchew)
  1299.  
  1300.                   and may or may not be contained within quote marks.  If
  1301.                   the name  cannot be accurately determined, the Internet
  1302.                   address can  be used  instead.   (Refer to section 5.4,
  1303.                   "The *.DAT File", for information on preserving the RFC
  1304.                   header for Internet messages.)
  1305.  
  1306.              subject
  1307.  
  1308.                   The subject  of  the  message.    For  Internet  E-mail
  1309.                   messages and  Usenet  newsgroup  articles,  this  field
  1310.                   should contain  as much  of the  text in the "Subject:"
  1311.                   line of  the RFC header as possible.  (Refer to section
  1312.                   5.4,  "The   *.DAT  File",   for  more  information  on
  1313.                   preserving the RFC header for Internet messages.)
  1314.  
  1315.              date
  1316.  
  1317.                   The date and time the message was written.  There is no
  1318.                   exact format required for this field; it is mainly used
  1319.                   for display  purposes in  the reader.  We recommend the
  1320.                   use of the Fido date format ("DD MMM YY  HH:MM:SS"), if
  1321.                   possible.
  1322.  
  1323.              msgnum
  1324.  
  1325.                   The number  corresponding to  the message stored on the
  1326.                   host system.   Values  greater than  65,535  should  be
  1327.                   wrapped (i.e.  65,536 will  be 0, 65,537 will be 1, and
  1328.                   so on).  This field is used mainly for display purposes
  1329.                   in the reader.
  1330.  
  1331.              replyto
  1332.  
  1333.                   The message  number on  the host  system to  which this
  1334.                   message is  a reply.   Used  in the reader to jump back
  1335.                   and forth along a message thread.
  1336.  
  1337.              replyat
  1338.  
  1339.                   The message  number on the host system which is a reply
  1340.                   to this  message.   Used in the reader to jump back and
  1341.                   forth along a message thread.
  1342.  
  1343.              msgptr
  1344.  
  1345.                   The offset  (in bytes) to the start of the text of this
  1346.                   message in  the *.DAT  file (described  later).    Each
  1347.                   message in the mail packet MUST have corresponding text
  1348.                   in the  *.DAT file;  refer to  section 5.4,  "The *.DAT
  1349.                   File", for more information.
  1350.  
  1351.  
  1352.  
  1353.                     ----------------------------------------
  1354.                The Blue Wave Developer's Kit - Version 3 - Page 20
  1355.              msglength
  1356.  
  1357.                   Length of the message text, in bytes.
  1358.  
  1359.              flags
  1360.  
  1361.                   Bit-mapped flags  indicating the status of the message.
  1362.                   Refer to the header file for a list of available flags.
  1363.  
  1364.              orig_zone, orig_net, orig_node
  1365.  
  1366.                   For FidoNet NetMail messages, these fields indicate the
  1367.                   address of  the node  (zone:net/node) that  created the
  1368.                   message.
  1369.  
  1370.  
  1371.         Section 5.4  The *.DAT File
  1372.  
  1373.         The *.DAT  file contains  the text  of each  message in  the mail
  1374.         packet.  A message consists of a mandatory space character (ASCII
  1375.         32), followed by zero or more characters.  (ASCII characters 1 to
  1376.         255 are  valid.   ASCII 0 is not permitted, since it is used as a
  1377.         string terminator  in the C language.)  The message does not need
  1378.         to be  terminated with  an ASCII  0 character,  since  the  exact
  1379.         length of  the text  (including the  leading space  character) is
  1380.         stored in the *.FTI record.
  1381.  
  1382.         The formatting  of  text  follows  the  standard  established  by
  1383.         FidoNet, with  each paragraph  terminated by  a  carriage  return
  1384.         (ASCII 13).  Linefeeds (ASCII 10), if present, are to be ignored.
  1385.         So-called "soft carriage returns" (ASCII 141), which some editors
  1386.         use for  formatting lines  of text,  should generally  be ignored
  1387.         except under  special circumstances  (such as in situations where
  1388.         foreign or  double-byte character  sets are recognized).  "Hidden
  1389.         text lines"  are allowed  by placing  an ASCII 1 character at the
  1390.         start of  the line,  and terminating  the line  with  a  carriage
  1391.         return; such lines should generally not exceed 79 characters.  In
  1392.         FidoNet bases, hidden text lines serve as extensions to the specs
  1393.         of FidoNet  messages, and are used to specify control information
  1394.         that is  otherwise incomplete or unavailable.  (FidoNet refers to
  1395.         these lines as "kludge lines" or "control lines".)
  1396.  
  1397.         Note that  if the  host system  uses  a  different  character  to
  1398.         terminate lines and paragraphs, that character should be replaced
  1399.         with a carriage return when packing messages.  An example of such
  1400.         a system  is PCBoard,  which uses  an ASCII  227 for  terminating
  1401.         lines and paragraphs in messages.
  1402.  
  1403.         General guidelines for packing messages in doors:
  1404.  
  1405.              Local message bases
  1406.  
  1407.                   The entire text of the message can be packed verbatim.
  1408.  
  1409.              FidoNet NetMail bases
  1410.  
  1411.  
  1412.                     ----------------------------------------
  1413.                The Blue Wave Developer's Kit - Version 3 - Page 21
  1414.  
  1415.                   Again, the  text of the message can be packed verbatim.
  1416.                   You may  also elect  to strip out kludge lines, as they
  1417.                   add unnecessary  overhead to  the mail  packet (this is
  1418.                   usually provided as a user-selectable option).
  1419.  
  1420.                   Note that  the FMPT  kludge line,  which specifies  the
  1421.                   point number  portion of  the origin  address, MUST  be
  1422.                   present in  NetMail messages if the point number is not
  1423.                   zero.   This is  to overcome  an oversight  in the Blue
  1424.                   Wave specifications  (the *.FTI record does not include
  1425.                   a field  for the  point number).  If a message contains
  1426.                   this line,  it must not be stripped out; if it does not
  1427.                   have one,  but the  point number  is not  zero, then it
  1428.                   must be  added to  the message  during  packing.    The
  1429.                   format is  "FMPT nnn",  where "nnn" is the point number
  1430.                   (the line  is preceded  by an  ASCII 1,  and terminated
  1431.                   with a carriage return).
  1432.  
  1433.              FidoNet EchoMail bases
  1434.  
  1435.                   Once again, the text can be packed verbatim, and hidden
  1436.                   text lines may be stripped out at the user's request.
  1437.  
  1438.                   Note that  the MSGID  kludge line, if present, MUST NOT
  1439.                   be stripped,  in order  to accommodate  reply  linking.
  1440.                   (Reply linking  is discussed in section 5.5, "The *.UPL
  1441.                   File".)   Also note  that SEEN-BY lines, which indicate
  1442.                   the systems  that have seen the message, can be treated
  1443.                   as kludge  lines; they  can be  stripped at  the user's
  1444.                   request, or  they can  be included  in  the  text  (and
  1445.                   should, ideally,  be hidden  behind ASCII 1 characters,
  1446.                   so that  they will be treated by readers as hidden text
  1447.                   lines).
  1448.  
  1449.              Internet and Usenet bases
  1450.  
  1451.                   Internet  E-mail  and  Usenet  newsgroup  messages,  as
  1452.                   obtained from the Internet, follow the format specified
  1453.                   in Internet  document RFC-822.   This  format calls for
  1454.                   messages to be stored as lines of text, with the header
  1455.                   lines first,  followed by  a blank line, then the lines
  1456.                   of message  text.   Most host  systems, when  importing
  1457.                   Internet E-mail  and Usenet  newsgroups,  will  usually
  1458.                   retain this format.
  1459.  
  1460.                   When packing  RFC-822-style messages,  the header lines
  1461.                   must be  converted to  hidden text  lines; these hidden
  1462.                   text lines  must not  be stripped.   Not only will this
  1463.                   hide the header from the user (in readers that suppress
  1464.                   the display of hidden text lines), it allows the reader
  1465.                   to more  easily find  header lines  when creating reply
  1466.                   messages,  as   creating  replies   to  these  messages
  1467.                   requires information that can only be obtained from the
  1468.                   RFC-822 header.
  1469.  
  1470.  
  1471.                     ----------------------------------------
  1472.                The Blue Wave Developer's Kit - Version 3 - Page 22
  1473.  
  1474.         General guidelines for handling messages in readers:
  1475.  
  1476.              If the  initial space  character is not present when reading
  1477.              the message  text, the  reader can  assume that  the message
  1478.              text (and  possibly the  enter *.DAT  file itself)  has been
  1479.              damaged.  The character itself is not to be displayed, as it
  1480.              is only used as an indicator in the *.DAT file.
  1481.  
  1482.              If a  line of  text is wider than the display area, the text
  1483.              should be  wrapped.  Generally, this wrapping is done at the
  1484.              first space character before the display area limit, so that
  1485.              words do not get chopped in half.
  1486.  
  1487.              Hidden text  lines  should  ideally  be  suppressed  by  the
  1488.              reader, as  they usually contain control information that is
  1489.              not important  to the  user.   Under such circumstances, the
  1490.              reader should  provide an  option for displaying these lines
  1491.              upon request  of the  user.   (For example,  The  Blue  Wave
  1492.              Offline Mail  Reader will  -- starting  with version 2.20 --
  1493.              only display  hidden text  lines in a pop-up window when the
  1494.              user enters  the command  to do  so.)  It's the best of both
  1495.              worlds:   The lines  are hidden,  yet available  to the user
  1496.              whenever the need arises.
  1497.  
  1498.  
  1499.         Section 5.5  The *.UPL File
  1500.  
  1501.         The *.UPL  file consists of two parts:  A single required header,
  1502.         and zero  or more  reply records  corresponding to  each  message
  1503.         contained in  the reply  packet.   Each reply record includes the
  1504.         names of  the persons  who wrote  the replies  and who  they  are
  1505.         addressed to,  the date  and time  the reply was written, and the
  1506.         name of the file containing the text of the reply message.
  1507.  
  1508.         Note that  reply records  do not have to appear in any particular
  1509.         order, save for the fact that they must always follow the header.
  1510.  
  1511.         The  header   record  is  called  UPL_HEADER,  and  contains  the
  1512.         following fields:
  1513.  
  1514.              regnum
  1515.  
  1516.                   Used by  The Blue Wave Offline Mail Reader to store the
  1517.                   registration code  of the  reader.  Third-party authors
  1518.                   should ignore this field.
  1519.  
  1520.              vernum
  1521.  
  1522.                   The version number of the reader.  As a simple security
  1523.                   measure, each character of the version number is stored
  1524.                   as the ASCII value plus 10.
  1525.  
  1526.              reader_major
  1527.  
  1528.  
  1529.  
  1530.                     ----------------------------------------
  1531.                The Blue Wave Developer's Kit - Version 3 - Page 23
  1532.                   The major version number of the reader (i.e. the number
  1533.                   to the  left of  the decimal  point).  For example, the
  1534.                   value 2 would be stored here for version 2.20.
  1535.  
  1536.              reader_minor
  1537.  
  1538.                   The minor version number of the reader (i.e. the number
  1539.                   to the  right of  the decimal point).  For example, the
  1540.                   value 20  (decimal) would  be stored  here for  version
  1541.                   2.20.
  1542.  
  1543.              reader_name
  1544.  
  1545.                   The name  of the reader.  Door programmers can use this
  1546.                   field to  display the name of the program which created
  1547.                   the reply packet.
  1548.  
  1549.              upl_header_len
  1550.  
  1551.                   Indicates the size of the UPL_HEADER structure.
  1552.  
  1553.              upl_rec_len
  1554.  
  1555.                   Indicates the size of the UPL_REC structure.
  1556.  
  1557.              loginname
  1558.  
  1559.                   The name  used by  the user when logging on to the host
  1560.                   system.  It should be filled with the name found in the
  1561.                   corresponding field  in INF_HEADER,  and can be used by
  1562.                   door authors as a possible security measure.
  1563.  
  1564.              aliasname
  1565.  
  1566.                   An alternate  name used by the user on the host system.
  1567.                   It  should  be  filled  with  the  name  found  in  the
  1568.                   corresponding field  in INF_HEADER,  and can be used by
  1569.                   door authors as a possible security measure.
  1570.  
  1571.              reader_tear
  1572.  
  1573.                   The abbreviated name of the reader.  Doors can use this
  1574.                   field, in  conjunction with  the "vernum" field, to add
  1575.                   "brag lines" (and tear lines in FidoNet EchoMail bases)
  1576.                   to reply  messages when  storing  them  in  the  host's
  1577.                   message bases.
  1578.  
  1579.                   Note that  older readers,  such as versions of The Blue
  1580.                   Wave Offline Mail Reader prior to version 2.20, may not
  1581.                   fill in this field.  If it is blank, the brag/tear line
  1582.                   to be  generated is  left  to  the  discretion  of  the
  1583.                   author.
  1584.  
  1585.              compress_type
  1586.  
  1587.  
  1588.  
  1589.                     ----------------------------------------
  1590.                The Blue Wave Developer's Kit - Version 3 - Page 24
  1591.                   Used by  The Blue Wave Offline Mail Reader to store the
  1592.                   compression type used by the reply packet.
  1593.  
  1594.              flags
  1595.  
  1596.                   Used by  The Blue  Wave Offline  Mail Reader  to  store
  1597.                   various flags required for reply message processing.
  1598.  
  1599.              not_registered
  1600.  
  1601.                   A flag that indicates the reader is not registered.  If
  1602.                   it is  non-zero, the  reader that  generated the  reply
  1603.                   packet has  not been registered by its user.  Doors can
  1604.                   use this  field to  add an  indicator to  the brag/tear
  1605.                   line which shows that the reader is not registered (for
  1606.                   example, The  Blue Wave  Offline Mail  Door will append
  1607.                   "[NR]" to the line).
  1608.  
  1609.         The reply  message record  is called  UPL_REC, and  contains  the
  1610.         following fields:
  1611.  
  1612.              from
  1613.  
  1614.                   The name  of the  person who  wrote the  reply message.
  1615.                   This field  should only  be used for message areas that
  1616.                   allow any  name  to  be  entered  in  the  From  field;
  1617.                   otherwise, the  user's name or alias (obtained from the
  1618.                   host system) should be used.
  1619.  
  1620.              to
  1621.  
  1622.                   The name  of the  person to  whom the  reply message is
  1623.                   addressed.   Note that this field applies only to local
  1624.                   and FidoNet areas only.  For Internet E-mail areas, the
  1625.                   destination  E-mail   address  is   obtained  from  the
  1626.                   "net_dest" field  (described below).  Usenet newsgroups
  1627.                   do not  use a  To field, thus doors should use the text
  1628.                   "All" when  storing messages  on host systems that have
  1629.                   such a field.
  1630.  
  1631.              subj
  1632.  
  1633.                   The subject  of the reply message.  For Internet E-mail
  1634.                   and Usenet  newsgroup areas,  doors should  examine the
  1635.                   text of  the reply  message for a Subject control line,
  1636.                   and compare  the text  in that  line  with  this  field
  1637.                   (ignoring any  "Re:" sequences).  If the two are equal,
  1638.                   up to  the length  of the  text in this field, the door
  1639.                   should assume that the user did not change the subject,
  1640.                   and use  the text  in the  Subject line  instead of the
  1641.                   text in  this field  (in  order  to  preserve  subjects
  1642.                   longer than  71 characters).   Otherwise,  the door can
  1643.                   assume that  the user  has  changed  the  subject,  and
  1644.                   should use the text in this field.
  1645.  
  1646.  
  1647.  
  1648.                     ----------------------------------------
  1649.                The Blue Wave Developer's Kit - Version 3 - Page 25
  1650.              destzone, destnet, destnode, destpoint
  1651.  
  1652.                   For  FidoNet   NetMail  reply  messages,  these  fields
  1653.                   indicate the  address (zone:net/node.point) of the node
  1654.                   to whom the message is addressed.
  1655.  
  1656.              msg_attr
  1657.  
  1658.                   Bit-mapped flags  indicating the  status of  the  reply
  1659.                   message.   Refer to  the header  file  for  a  list  of
  1660.                   available flags.
  1661.  
  1662.              netmail_attr
  1663.  
  1664.                   For FidoNet  NetMail reply  messages, these  bit-mapped
  1665.                   flags indicate the attributes that should be applied to
  1666.                   the message.   Refer  to the  header file for a list of
  1667.                   available flags.
  1668.  
  1669.              unix_date
  1670.  
  1671.                   The date  and time the message was written, stored Unix
  1672.                   style as  the number  of seconds since January 1, 1970.
  1673.                   Universal Coordinated  Time (UTC)  should be taken into
  1674.                   account when storing and using this value (the date and
  1675.                   time  functions   in  many   C  compilers  handle  this
  1676.                   automatically).
  1677.  
  1678.              replyto
  1679.  
  1680.                   The message number (obtained from the "msgnum" field in
  1681.                   FTI_REC) to which this message is a reply.
  1682.  
  1683.              filename
  1684.  
  1685.                   The name  of the  file which  contains the  text of the
  1686.                   reply message.  If the file does not exist in the reply
  1687.                   packet, or  if this  field is  empty, the  door  should
  1688.                   consider the record to be invalid.
  1689.  
  1690.              echotag
  1691.  
  1692.                   The tag  for the  message area  on the  host where this
  1693.                   reply message  should  be  stored.    This  field  must
  1694.                   contain the  same text  as the  corresponding field  in
  1695.                   INF_AREA_INFO, and  is used  by the door to ensure that
  1696.                   the reply message ends up in the proper area.
  1697.  
  1698.              area_flags
  1699.  
  1700.                   Contains the value stored in the corresponding field in
  1701.                   INF_AREA_INFO, and is used to ensure that later editing
  1702.                   of the  reply message  is handled  properly.   This  is
  1703.                   useful in  situations where  the reader  has not kept a
  1704.                   copy of  the *.INF  file from  the host  system and the
  1705.  
  1706.  
  1707.                     ----------------------------------------
  1708.                The Blue Wave Developer's Kit - Version 3 - Page 26
  1709.                   user wishes  to modify  the reply  packet without  also
  1710.                   opening a  mail packet  for  the  host  system.    Door
  1711.                   authors should ignore this field.
  1712.  
  1713.              f_attach
  1714.  
  1715.                   The name  of the  file that  is "attached" to the reply
  1716.                   message.   Used on  host systems that support attaching
  1717.                   files to  messages.   If the  UPL_HAS_FILE flag  in the
  1718.                   "msg_attr" field  is not  set, or  the  area  does  not
  1719.                   support attached  messages, doors  should  ignore  this
  1720.                   field.
  1721.  
  1722.              user_area
  1723.  
  1724.                   Provided for  reader authors to use as they see fit, to
  1725.                   store  reader-specific   information  for   the   reply
  1726.                   message.  Doors should ignore this field.
  1727.  
  1728.                   Note that  even though  this field is provided for your
  1729.                   use, the  use of  a separate file (one that is not part
  1730.                   of   the   official   Blue   Wave   specification)   is
  1731.                   recommended.   The  reason  for  this  is  that  reader
  1732.                   authors have  no way  of distinguishing the information
  1733.                   in this  field; thus, if the reply packet is handled by
  1734.                   more than  one reader,  the information  in this  field
  1735.                   could be clobbered.
  1736.  
  1737.              network_type
  1738.  
  1739.                   Contains the value stored in the corresponding field in
  1740.                   INF_AREA_INFO, and  is used  to indicate  the  type  of
  1741.                   network to  which the  reply  message  belongs.    This
  1742.                   allows for  proper processing  of the reply message, as
  1743.                   doors and  readers can  tell "at a glance" which fields
  1744.                   in the  reply record  should be used for the particular
  1745.                   network type.
  1746.  
  1747.              net_dest
  1748.  
  1749.                   For Internet E-mail reply messages, this field contains
  1750.                   the E-mail  address of  the person  to whom  the  reply
  1751.                   message is  destined.   It is  this text  that will  be
  1752.                   placed in the To: line of the RFC-822 header.
  1753.  
  1754.                   For FidoNet  NetMail and  EchoMail messages, this field
  1755.                   is used to store the information necessary for the door
  1756.                   to generate  a MSGID/REPLY  kludge line, as per FidoNet
  1757.                   technical document  FTS-0009.  The text to be stored in
  1758.                   this field should be in the format "REPLY: msgid_info",
  1759.                   where "msgid_info"  is the  information  following  the
  1760.                   MSGID keyword.   Doors can then take the information in
  1761.                   this field  and store  it in  the message  on the  host
  1762.                   system (be sure to place an ASCII 1 in front of it).
  1763.  
  1764.  
  1765.  
  1766.                     ----------------------------------------
  1767.                The Blue Wave Developer's Kit - Version 3 - Page 27
  1768.                   Note that  doors should  ensure that the field is valid
  1769.                   by testing  to see  if it begins with "REPLY:" (FidoNet
  1770.                   areas only).   If  it does  not, the  field  should  be
  1771.                   ignored.
  1772.  
  1773.  
  1774.         Section 5.6  Reply Message Text
  1775.  
  1776.         As indicated  above, the  text of each reply message is stored in
  1777.         its own  separate file  in the reply packet.  As with the message
  1778.         text stored in the *.DAT file, the text stored in a reply message
  1779.         text file  consists of  zero or  more characters  (ASCII values 1
  1780.         through 255),  with  each  line  or  paragraph  terminated  by  a
  1781.         carriage return  (ASCII 13).   Linefeeds (ASCII 10) are optional,
  1782.         as are  so-called "soft"  carriage returns (ASCII 141).  Carriage
  1783.         returns  and   linefeeds  should  be  handled  according  to  the
  1784.         conventions of  the host  system (for  example, PCBoard  requires
  1785.         that lines  and  paragraphs  be  terminated  with  an  ASCII  227
  1786.         character; in such cases, carriage returns should be converted to
  1787.         ASCII 227, and linefeeds should be ignored).
  1788.  
  1789.         For local and FidoNet reply messages, readers should not generate
  1790.         any hidden  text lines  in the  message text.  Doors should strip
  1791.         any such  lines before  storing the  message  text  on  the  host
  1792.         system.  This is to prevent malicious users from sending out fake
  1793.         control information  through FidoNet.    (Authors  should  obtain
  1794.         FidoNet technical  documents FTS-0001, FTS-0004, and FTS-0009 for
  1795.         more detailed information.)
  1796.  
  1797.         For Internet  E-mail and  Usenet newsgroup  reply  messages,  the
  1798.         following hidden  text lines  can be  placed in  the message text
  1799.         (authors should  obtain Internet  technical documents RFC-822 and
  1800.         RFC-1036 for more information):
  1801.  
  1802.              Subject:
  1803.  
  1804.                   This should  be an exact copy of the Subject: line from
  1805.                   the message in the mail packet.  Doors can compare this
  1806.                   line to  the  subject  text  in  the  "subj"  field  of
  1807.                   UPL_REC, to  determine if  this field should be used in
  1808.                   place of  the "subj"  text.   This allows  long subject
  1809.                   lines to  be preserved, and is a requirement for proper
  1810.                   message processing in Usenet newsgroups.
  1811.  
  1812.              References: (Usenet newsgroup areas only)
  1813.  
  1814.                   This should  be an  exact copy  of the References: line
  1815.                   from the  message in  the mail packet, with the text of
  1816.                   the Message-ID: line (if present) appended to it.  If a
  1817.                   References:  line   is  not  present  in  the  original
  1818.                   message, readers  should create one (using the contents
  1819.                   of the  Message-ID: line).  This allows the References:
  1820.                   line --  used by  many Usenet  news readers  to  thread
  1821.                   messages --  to be  preserved, and is a requirement for
  1822.                   proper message processing in Usenet newsgroups.
  1823.  
  1824.  
  1825.                     ----------------------------------------
  1826.                The Blue Wave Developer's Kit - Version 3 - Page 28
  1827.  
  1828.              Newsgroups: (Usenet newsgroup areas only)
  1829.  
  1830.                   This line  lists the  newsgroups to  which the  message
  1831.                   will be  posted.  If a Followup-To: line is not present
  1832.                   in the  original message,  the contents of the original
  1833.                   Newsgroups: line  should be  used (if  present).   If a
  1834.                   Followup-To: line is present, the contents of that line
  1835.                   should be  used,  and  the  original  Newsgroups:  line
  1836.                   discarded.   (This follows standard practice for Usenet
  1837.                   news readers.)
  1838.  
  1839.                   Readers can  allow the  user to  alter the  contents of
  1840.                   this line, if needed, so that the reply message will be
  1841.                   posted (by the news server) to multiple newsgroups.
  1842.  
  1843.              Followup-To: (Usenet newsgroup areas only)
  1844.  
  1845.                   This line lists the newsgroups to which replies to this
  1846.                   message should  be posted,  and is completely optional.
  1847.                   Readers can  allow the  user to  alter the  contents of
  1848.                   this line, if needed, so that when other users reply to
  1849.                   this message,  it will be posted (by their news server)
  1850.                   to the newsgroups listed in this line.
  1851.  
  1852.              X-Mailreader: (Internet E-mail areas only)
  1853.              X-Newsreader: (Usenet newsgroup areas only)
  1854.  
  1855.                   Identifies the  reader which created the reply message.
  1856.                   This line  should be appended to the end of the RFC-822
  1857.                   header when generating the message on the host system.
  1858.  
  1859.         Other RFC-822  header lines  -- From:,  To:, Message-ID:, etc. --
  1860.         should not  be included,  as it  is the job of the door to create
  1861.         these lines when uploading the reply message to the host system.
  1862.  
  1863.         The following  details should be observed by doors when uploading
  1864.         messages to the host system:
  1865.  
  1866.              Local areas
  1867.  
  1868.                   No special circumstances required.
  1869.  
  1870.              FidoNet NetMail areas
  1871.  
  1872.                   The FMPT  and TOPT  kludge lines  should be  added,  as
  1873.                   appropriate,  so   that  point  messages  are  properly
  1874.                   processed.   An INTL  kludge line  should be  added  to
  1875.                   messages destined for a different zone.  Adding a MSGID
  1876.                   kludge line  is recommended,  and a  REPLY kludge  line
  1877.                   should be  added if the necessary information is in the
  1878.                   "net_dest"  field   of  UPL_REC.     Refer  to  FidoNet
  1879.                   technical documents  FTS-0001  and  FTS-0009  for  more
  1880.                   information.
  1881.  
  1882.  
  1883.  
  1884.                     ----------------------------------------
  1885.                The Blue Wave Developer's Kit - Version 3 - Page 29
  1886.              FidoNet EchoMail areas
  1887.  
  1888.                   The FMPT,  TOPT, and  INTL kludge lines are not needed,
  1889.                   and in fact are illegal in EchoMail messages.  Adding a
  1890.                   MSGID kludge  line is  recommended, and  a REPLY kludge
  1891.                   line should be added if the necessary information is in
  1892.                   the "net_dest"  field of  UPL_REC.   A tear line and an
  1893.                   origin line  should be  appended to the message.  Refer
  1894.                   to FidoNet  technical documents  FTS-0004 and  FTS-0009
  1895.                   for more information.
  1896.  
  1897.              Internet E-mail areas
  1898.  
  1899.                   For host  systems that require it, the complete RFC-822
  1900.                   header should  be generated,  with all necessary fields
  1901.                   (including  From:,   To:,  Date:,   and   Message-ID:).
  1902.                   Include the fields described earlier if necessary.
  1903.  
  1904.                   Some host systems may require more or less information;
  1905.                   the door  author will  have to  code the door to handle
  1906.                   things accordingly.
  1907.  
  1908.              Usenet newsgroup areas
  1909.  
  1910.                   For host  systems that require it, the complete RFC-822
  1911.                   header should  be generated,  with all necessary fields
  1912.                   (including From:, Date:, Message-ID:, and Newsgroups:).
  1913.                   Include the  fields described earlier if necessary.  If
  1914.                   a Newsgroups: line is not present in the reply message,
  1915.                   one should  be created using information available from
  1916.                   the host system.
  1917.  
  1918.                   Some host systems may require more or less information;
  1919.                   the door  author will  have to  code the door to handle
  1920.                   things accordingly.
  1921.  
  1922.         Finally, door  authors will  need to  handle such details as ANSI
  1923.         escape sequences,  ASCII characters  in the  range  128-255  (so-
  1924.         called "high  ASCII"), and  so forth.  You should not rely on the
  1925.         reader to handle them.
  1926.  
  1927.  
  1928.         Section 5.7  The *.REQ File
  1929.  
  1930.         The *.REQ  file consists of zero or more records, each containing
  1931.         the name  of a  file which  the user  wishes to download from the
  1932.         host system.
  1933.  
  1934.         The record is called REQ_REC, and contains the following field:
  1935.  
  1936.              filename
  1937.  
  1938.                   The name  of the file to download from the host system,
  1939.                   in MS-DOS  format.   The filename  may contain wildcard
  1940.  
  1941.  
  1942.  
  1943.                     ----------------------------------------
  1944.                The Blue Wave Developer's Kit - Version 3 - Page 30
  1945.                   characters ("*" and "?"), but doors are not required to
  1946.                   honor them.
  1947.  
  1948.         In theory,  the number  of records  which can  be contained  in a
  1949.         *.REQ file  is unlimited.   However, doors and readers may impose
  1950.         limits on  the number  of files  which the user may request.  For
  1951.         example, The  Blue Wave  Offline Mail  Door will  not accept more
  1952.         than 10 files, and will ignore any entries in the *.REQ file past
  1953.         the 10th record.
  1954.  
  1955.         The fixed-length  nature of  the filename  field in REQ_REC means
  1956.         that long  filenames, as  supported by  such operating systems as
  1957.         OS/2,  Unix,  MacOS,  Windows  NT,  and  Windows  95,  cannot  be
  1958.         supported.  A future revision of the Blue Wave specification will
  1959.         contain a  replacement for  the *.REQ  file, one which will allow
  1960.         the use of long filenames.
  1961.  
  1962.  
  1963.         Section 5.8  The *.OLC File
  1964.  
  1965.         The *.OLC  file is  a text  file that  contains information  with
  1966.         which the  mail door  on the  host system can be configured.  The
  1967.         file is  in Microsoft Windows INI format (refer to Appendix B for
  1968.         a description  of this format), and consists of a single required
  1969.         section for  global information,  and zero  or more sections that
  1970.         indicate configuration information for message areas.
  1971.  
  1972.         The global information section uses the header:
  1973.  
  1974.              [Global Mail Host Information]
  1975.  
  1976.         The following  keywords may  appear in  this section (any keyword
  1977.         that does not appear indicate that the feature in question should
  1978.         be left unchanged):
  1979.  
  1980.              MenuHotKeys=flag
  1981.  
  1982.                   Specifies whether  or not  "hot keys" are to be used in
  1983.                   the door's  menus.   ("Hot keys" indicate that the user
  1984.                   does not  have to  press ENTER  after selecting  a menu
  1985.                   item.)
  1986.  
  1987.              ExpertMenus=flag
  1988.  
  1989.                   Specifies whether  or not  expert mode is to be used in
  1990.                   the door.   In  expert mode,  only the  menu prompt  is
  1991.                   displayed, as opposed to the full menu.
  1992.  
  1993.              SkipUserMsgs=flag
  1994.  
  1995.                   Indicates whether  or not  to bundle messages that were
  1996.                   written by the user.
  1997.  
  1998.              ExtendedInfo=flag
  1999.  
  2000.  
  2001.  
  2002.                     ----------------------------------------
  2003.                The Blue Wave Developer's Kit - Version 3 - Page 31
  2004.                   Specifies whether  or not  to include hidden text lines
  2005.                   in messages that are bundled for download.
  2006.  
  2007.              NumericExtensions=flag
  2008.  
  2009.                   Specifies whether  or not to use numeric extensions for
  2010.                   mail packets.   If  enabled, numeric extensions ("999")
  2011.                   are used;  if disabled,  day of week extensions ("SU1")
  2012.                   are used.
  2013.  
  2014.              NewFileList=style
  2015.  
  2016.                   Specifies whether  or not  a list of new files is to be
  2017.                   generated when  creating a  mail packet,  and how  that
  2018.                   list is  to appear.  "Style" can be TEXT, ANSI, or OFF.
  2019.                   If set  to TEXT, the list is generated as a plain ASCII
  2020.                   text file.   If set to ANSI, the list will be colorized
  2021.                   with ANSI  color sequences.  If set to OFF, the list is
  2022.                   not generated.
  2023.  
  2024.              DoorGraphics=flag
  2025.  
  2026.                   Specifies whether or not ANSI color sequences are to be
  2027.                   used when displaying output from the door.  If enabled,
  2028.                   ANSI color  codes are used; if disabled, output is done
  2029.                   using plain text.
  2030.  
  2031.              Password=type[,password]
  2032.  
  2033.                   Sets the  user's password  and specifies  the  type  of
  2034.                   password to  be used.   "Type"  can  be  "No",  "Door",
  2035.                   "Reader",  or  "Both".    If  "No"  is  specified,  the
  2036.                   password is  to be  removed; otherwise, the password is
  2037.                   to be set as defined.
  2038.  
  2039.              MaxPacketSize=nnnK
  2040.  
  2041.                   Specifies  the  maximum  size  (in  kilobytes)  of  the
  2042.                   download packet, BEFORE archiving.  The value "nnn" can
  2043.                   range from  0 to  32,767, with  0 indicating the packet
  2044.                   can be of unlimited size.
  2045.  
  2046.              Filter=text
  2047.  
  2048.                   Specifies the  text to  be used  for a bundling filter.
  2049.                   Theoretically, there  is no  limit  to  the  number  of
  2050.                   Filter statements that can be included, though the door
  2051.                   can limit  how many  it will  accept (and  besides, the
  2052.                   filter table  in  the  *.INF  file  is  limited  to  10
  2053.                   entries).
  2054.  
  2055.                   If the  door detects one or more Filter keywords in the
  2056.                   *.OLC file,  it  should  erase  all  currently  defined
  2057.                   bundling  filters   and  replace  them  with  the  ones
  2058.                   specified in the *.OLC file.
  2059.  
  2060.  
  2061.                     ----------------------------------------
  2062.                The Blue Wave Developer's Kit - Version 3 - Page 32
  2063.  
  2064.              Keyword=text
  2065.  
  2066.                   Specifies the  text to  be used for a bundling keyword.
  2067.                   Theoretically, there  is no  limit  to  the  number  of
  2068.                   Keyword statements  that can  be included,  though  the
  2069.                   door can  limit how  many it  will accept (and besides,
  2070.                   the keyword  table in  the *.INF  file is limited to 10
  2071.                   entries).
  2072.  
  2073.                   If the door detects one or more Keyword keywords in the
  2074.                   *.OLC file,  it  should  erase  all  currently  defined
  2075.                   bundling  keywords  and  replace  them  with  the  ones
  2076.                   specified in the *.OLC file.
  2077.  
  2078.              Macro=[Auto,]text
  2079.  
  2080.                   Specifies the text to be used for a bundling macro.  If
  2081.                   "Auto," appears in front of the text, the macro will be
  2082.                   considered an  auto-execute macro,  which the door will
  2083.                   execute immediately when the user chooses to download a
  2084.                   packet.
  2085.  
  2086.                   Theoretically, there is no limit to the number of Macro
  2087.                   statements that  can be  included, though  the door can
  2088.                   limit how  many it  will accept (and besides, the macro
  2089.                   table in the *.INF file is limited to three entries).
  2090.  
  2091.                   If the  door detects  one or more Macro keywords in the
  2092.                   *.OLC file,  it  should  erase  all  currently  defined
  2093.                   bundling  macros   and  replace   them  with  the  ones
  2094.                   specified in the *.OLC file.
  2095.  
  2096.              AreaChanges=flag
  2097.  
  2098.                   Indicates whether  or not  the status  of one  or  more
  2099.                   message areas  have been  changed.   See below for more
  2100.                   details.
  2101.  
  2102.         If the  AreaChanges keyword  is true,  then the door will need to
  2103.         begin processing  message areas.   Each  message area in the file
  2104.         has its  own section,  with the  echo tag  for the  message  area
  2105.         serving as  the section  header.  (Do not worry about conflicting
  2106.         with the  global section  header.   Echo tags  are limited  to 20
  2107.         characters, and the global section header text is much longer.)
  2108.  
  2109.         The following  keywords are  currently allowed for a message area
  2110.         section:
  2111.  
  2112.              Scan=type
  2113.  
  2114.                   Specifies how  messages in  the message  area are to be
  2115.                   bundled.     "Type"  can   be  "All"   (all  messages),
  2116.                   "PersOnly"  (only  personal  messages),  or  "Pers+All"
  2117.  
  2118.  
  2119.  
  2120.                     ----------------------------------------
  2121.                The Blue Wave Developer's Kit - Version 3 - Page 33
  2122.                   (only  personal  messages  and  messages  addressed  to
  2123.                   "All").
  2124.  
  2125.         When the  door processes  the areas  in the  *.OLC file,  it must
  2126.         first mark  as inactive  all areas for the user, then re-activate
  2127.         the ones  specified in  the file.  The reader must make sure that
  2128.         the *.OLC file includes sections for all areas which the user has
  2129.         kept active.   It's  not the most sophisticated system, true, but
  2130.         it's simple and easy to implement.
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.                     ----------------------------------------
  2180.                The Blue Wave Developer's Kit - Version 3 - Page 34
  2181.                                ------------------------------------------
  2182.                                APPENDIX A:  OBSOLETE BLUE WAVE STRUCTURES
  2183.                                ------------------------------------------
  2184.  
  2185.  
  2186.         As the  Blue Wave format has evolved, several files used in older
  2187.         versions have  become obsolete.   However, older versions of Blue
  2188.         Wave applications may require that these files be present.  Thus,
  2189.         they are  described here, and included in the header file.  Note,
  2190.         however, that  expectations of  backwards compatibility cannot be
  2191.         maintained forever,  and eventually,  these  structures  will  be
  2192.         dropped completely.
  2193.  
  2194.  
  2195.         Section A.1  The *.UPI File
  2196.  
  2197.         The *.UPI file serves the same purpose as the current *.UPL file,
  2198.         the exception  being that  it does  not define reply messages for
  2199.         FidoNet NetMail  areas.   Since it  does not contain the extended
  2200.         information present in the *.UPL file, the *.UPI file can only be
  2201.         used for local and FidoNet areas.
  2202.  
  2203.         The *.UPI  file consists of two parts:  A single required header,
  2204.         and zero  or more reply records corresponding to each non-NetMail
  2205.         message contained  in  the  reply  packet.    Each  reply  record
  2206.         includes the  names of  the persons who wrote the replies and who
  2207.         they are  addressed to,  the date and time the reply was written,
  2208.         and the  name of  the file  containing  the  text  of  the  reply
  2209.         message.
  2210.  
  2211.         Note that  reply records  do not have to appear in any particular
  2212.         order, save for the fact that they must always follow the header.
  2213.  
  2214.         The  header   record  is  called  UPI_HEADER,  and  contains  the
  2215.         following fields:
  2216.  
  2217.              regnum
  2218.  
  2219.                   Used by  The Blue Wave Offline Mail Reader to store the
  2220.                   registration code  of the  reader.  Third-party authors
  2221.                   should ignore this field.
  2222.  
  2223.              vernum
  2224.  
  2225.                   The version number of the reader.  As a simple security
  2226.                   measure, each character of the version number is stored
  2227.                   as the ASCII value plus 10.
  2228.  
  2229.         The reply  message record  is called  UPI_REC, and  contains  the
  2230.         following fields:
  2231.  
  2232.              from
  2233.  
  2234.                   The name  of the  person who  wrote the  reply message.
  2235.                   This field  should only  be used for message areas that
  2236.  
  2237.  
  2238.                     ----------------------------------------
  2239.                The Blue Wave Developer's Kit - Version 3 - Page 35
  2240.                   allow any  name  to  be  entered  in  the  From  field;
  2241.                   otherwise, the  user's name or alias (obtained from the
  2242.                   host system) should be used.
  2243.  
  2244.              to
  2245.  
  2246.                   The name  of the  person to  whom the  reply message is
  2247.                   addressed.
  2248.  
  2249.              subj
  2250.  
  2251.                   The subject of the reply message.
  2252.  
  2253.              unix_date
  2254.  
  2255.                   The date  and time the message was written, stored Unix
  2256.                   style as  the number  of seconds since January 1, 1970.
  2257.                   Universal Coordinated  Time (UTC)  should be taken into
  2258.                   account when storing and using this value (the date and
  2259.                   time  functions   in  many   C  compilers  handle  this
  2260.                   automatically).
  2261.  
  2262.              fname
  2263.  
  2264.                   The name  of the  file which  contains the  text of the
  2265.                   reply message.  If the file does not exist in the reply
  2266.                   packet, or  if this  field is  empty, the  door  should
  2267.                   consider the record to be invalid.
  2268.  
  2269.              echotag
  2270.  
  2271.                   The tag  for the  message area  on the  host where this
  2272.                   reply message  should  be  stored.    This  field  must
  2273.                   contain the  same text  as the  corresponding field  in
  2274.                   INF_AREA_INFO, and  is used  by the door to ensure that
  2275.                   the reply message ends up in the proper area.
  2276.  
  2277.              flags
  2278.  
  2279.                   Bit-mapped flags  indicating the  status of  the  reply
  2280.                   message.   Refer to  the header  file  for  a  list  of
  2281.                   available flags.
  2282.  
  2283.              reedit
  2284.  
  2285.                   Used by The Blue Wave Offline Mail Reader.  Third party
  2286.                   applications should ignore this field.
  2287.  
  2288.         Readers should  generate a *.UPI file only if the "uses_upl_file"
  2289.         field in  INF_HEADER is  not set,  AND the  mail packet format is
  2290.         earlier than  version 3.   Doors should process a *.UPI file only
  2291.         if a *.UPL file is not present.
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.                     ----------------------------------------
  2298.                The Blue Wave Developer's Kit - Version 3 - Page 36
  2299.         Section A.2  The *.NET File
  2300.  
  2301.         The *.NET file serves the same purpose as the current *.UPL file,
  2302.         the exception  being that  it only  defines  reply  messages  for
  2303.         FidoNet NetMail  areas.  It consists of one or more records, each
  2304.         containing the information for a FidoNet NetMail reply message.
  2305.  
  2306.         The NetMail  reply message record is called NET_REC, and contains
  2307.         the following fields:
  2308.  
  2309.              msg
  2310.  
  2311.                   A structure  containing the  addressing information for
  2312.                   the NetMail  message.   This structure  is exactly  the
  2313.                   same as  the header  for the  Fido *.MSG  file, and  is
  2314.                   described below.
  2315.  
  2316.              fname
  2317.  
  2318.                   The name  of the  file which  contains the  text of the
  2319.                   reply message.  If the file does not exist in the reply
  2320.                   packet, or  if this  field is  empty, the  door  should
  2321.                   consider the record to be invalid.
  2322.  
  2323.              echotag
  2324.  
  2325.                   The tag  for the  message area  on the  host where this
  2326.                   reply message  should  be  stored.    This  field  must
  2327.                   contain the  same text  as the  corresponding field  in
  2328.                   INF_AREA_INFO, and  is used  by the door to ensure that
  2329.                   the reply message ends up in the proper area.
  2330.  
  2331.              zone
  2332.  
  2333.                   Contains the  zone number  of the  destination  FidoNet
  2334.                   node address  (zone:net/node.point), as  the Fido *.MSG
  2335.                   header does not contain a field for the zone number.
  2336.  
  2337.              point
  2338.  
  2339.                   Contains the  point number  of the  destination FidoNet
  2340.                   node address  (zone:net/node.point), as  the Fido *.MSG
  2341.                   header does not contain a field for the point number.
  2342.  
  2343.              unix_date
  2344.  
  2345.                   The date  and time the message was written, stored Unix
  2346.                   style as  the number  of seconds since January 1, 1970.
  2347.                   Universal Coordinated  Time (UTC)  should be taken into
  2348.                   account when storing and using this value (the date and
  2349.                   time  functions   in  many   C  compilers  handle  this
  2350.                   automatically).
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.                     ----------------------------------------
  2357.                The Blue Wave Developer's Kit - Version 3 - Page 37
  2358.         The Fido  *.MSG structure  is  defined  in  the  header  file  as
  2359.         MSG_REC.  The following fields in MSG_REC are of concern to doors
  2360.         and readers (the rest can be ignored):
  2361.  
  2362.              from
  2363.  
  2364.                   The name  of the  person who  wrote the  reply message.
  2365.                   This field  should only  be used for message areas that
  2366.                   allow any  name  to  be  entered  in  the  From  field;
  2367.                   otherwise, the  user's name or alias (obtained from the
  2368.                   host system) should be used.
  2369.  
  2370.              to
  2371.  
  2372.                   The name  of the  person to  whom the  reply message is
  2373.                   addressed.
  2374.  
  2375.              subj
  2376.  
  2377.                   The subject of the reply message.
  2378.  
  2379.              dest
  2380.  
  2381.                   The node number of the destination FidoNet node address
  2382.                   (zone:net/node.point).
  2383.  
  2384.              destnet
  2385.  
  2386.                   The net  number of the destination FidoNet node address
  2387.                   (zone:net/node.point).
  2388.  
  2389.              attr
  2390.  
  2391.                   Bit-mapped flags indicating the NetMail attributes that
  2392.                   should be  applied to the message.  Refer to the header
  2393.                   file for a list of available flags.
  2394.  
  2395.         Readers should generate a *.NET file if the "uses_upl_file" field
  2396.         in INF_HEADER  is not  set, AND the mail packet format is earlier
  2397.         than version  3.   Doors should  process a  *.NET file  only if a
  2398.         *.UPL file is not present.
  2399.  
  2400.  
  2401.         Section A.3  The *.PDQ File
  2402.  
  2403.         The *.PDQ file serves the same purpose as the *.OLC file, in that
  2404.         it defines  the necessary values to perform offline configuration
  2405.         of the  mail door.   The  *.PDQ file consists of a single header,
  2406.         followed by  zero or more records defining the message areas that
  2407.         the user wishes to enable for bundling.
  2408.  
  2409.         The configuration  file header is called PDQ_HEADER, and contains
  2410.         the following fields:
  2411.  
  2412.              keywords
  2413.  
  2414.  
  2415.                     ----------------------------------------
  2416.                The Blue Wave Developer's Kit - Version 3 - Page 38
  2417.  
  2418.                   The keywords  used when  bundling messages.   Up  to 10
  2419.                   keywords may be defined.
  2420.  
  2421.              filters
  2422.  
  2423.                   The filters  used when  bundling messages.   Up  to  10
  2424.                   filters may be defined.
  2425.  
  2426.              macros
  2427.  
  2428.                   The macros  used to  specify bundling  commands.  Up to
  2429.                   three macros may be defined.
  2430.  
  2431.              password
  2432.  
  2433.                   The user's password.
  2434.  
  2435.              passtype
  2436.  
  2437.                   The intended use for the defined password.  0 indicates
  2438.                   no password, 1 indicates a door password, 2 indicates a
  2439.                   reader password,  and 3  indicates a  password for both
  2440.                   the reader and the door.
  2441.  
  2442.              flags
  2443.  
  2444.                   Bit-mapped flags  indicating which  door options should
  2445.                   be enabled  and disabled.  Refer to the header file for
  2446.                   a list of available flags.
  2447.  
  2448.         The configuration file message area record is called PDQ_REC, and
  2449.         contains the following field:
  2450.  
  2451.              echotag
  2452.  
  2453.                   The echo  tag of  the message  area that  is to be made
  2454.                   active for bundling.
  2455.  
  2456.         If the  PDQ_AREA_CHANGES flag  in the "flags" field of PDQ_HEADER
  2457.         is set,  the door  should deactivate  all of  the user's  message
  2458.         areas, then  activate each  area specified in the PDQ_REC records
  2459.         contained in the *.PDQ file.
  2460.  
  2461.         Readers should  generate a  *.PDQ file  only if  the mail  packet
  2462.         format is  earlier than version 3; otherwise, a *.OLC file should
  2463.         be generated.   Doors should process a *.PDQ file only if a *.OLC
  2464.         file is not present.
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.                     ----------------------------------------
  2475.                The Blue Wave Developer's Kit - Version 3 - Page 39
  2476.                             ---------------------------------------------
  2477.                             APPENDIX B:  THE MICROSOFT WINDOWS INI FORMAT
  2478.                             ---------------------------------------------
  2479.  
  2480.  
  2481.         As mentioned earlier, the offline configuration file (*.OLC) used
  2482.         in the  reply packet is a text file that uses a format similar to
  2483.         the Microsoft  Windows INI  format.   The greatest  advantage  to
  2484.         using this  format, as opposed to a binary file with fixed-length
  2485.         records, is that it can be easily extended without breaking older
  2486.         applications.
  2487.  
  2488.         The INI  file format is quite simple.  It consists of one or more
  2489.         sections, with  a section  consisting of a unique header name (in
  2490.         square brackets,  "[]") followed  by zero  or more  configuration
  2491.         lines.   These configuration  lines take  the form  of a keyword,
  2492.         followed by an equal sign, followed by a value.  It is similar to
  2493.         the following:
  2494.  
  2495.              [Header]
  2496.              Keyword=Value
  2497.              Keyword=Value
  2498.              .
  2499.              .
  2500.              .
  2501.  
  2502.         Keywords are case-insensitive.  The value itself can be a decimal
  2503.         number, a string, or a true/false value, depending on the keyword
  2504.         and what it configures.  True values can be specified as YES, ON,
  2505.         or TRUE; false values can be specified as NO, OFF, or FALSE.
  2506.  
  2507.         To obtain  information from  the file,  you must first search for
  2508.         the desired header.  (Strip any and all spaces and tab characters
  2509.         -- ASCII  9 -- that are present at the start of the line, as well
  2510.         as all  such characters  before and after the equal sign on lines
  2511.         containing a  keyword.)   After the  header has  been found, each
  2512.         line that  follows should  be read  and examined.   If  the  line
  2513.         begins  with   a  recognized  keyword,  that  line  is  processed
  2514.         accordingly.  If the line begins with a left bracket ("["), there
  2515.         are no more keywords in the section.
  2516.  
  2517.         Keywords that  are not recognized are to be ignored.  This is the
  2518.         key to  the format's  extensibility, as new keywords can be added
  2519.         to the  file in  future versions  with the  assurance that  older
  2520.         versions will ignore the new keywords.
  2521.  
  2522.         The file  can also  contain any number of blank lines, as well as
  2523.         comment lines.   If a line begins with a semicolon (";"), it is a
  2524.         comment line and should be ignored.
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.                     ----------------------------------------
  2534.                The Blue Wave Developer's Kit - Version 3 - Page 40